package com.tg.paw.common.feign;

import com.tg.paw.common.config.FeignConfiguration;
import com.tg.paw.common.entity.UserAdmin;
import com.tg.paw.common.feign.fallback.AdminServiceFeignFallbackFactory;
import com.tg.paw.common.util.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author Rubble
 * @date 2020/10/28
 */
@FeignClient(value = "paw-ums",fallbackFactory = AdminServiceFeignFallbackFactory.class, configuration = FeignConfiguration.class)
public interface AdminServiceFeignClient {

    /**
     * 获取当前用户
     * @return
     */
    @GetMapping("/api/ums/currentUser")
    CommonResult<UserAdmin> currentUser();

}
